package student.stu23002123.chapter10;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

public class IoFile {
    public static void main(String[] args) {
        File f = new File("C:\\Users\\Administrator\\IdeaProjects\\java202312\\src\\student\\stu23002123\\stu23002123.txt");
        try {
            f.createNewFile();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        try (FileWriter writer = new FileWriter(f)) {
            writer.write("stu23002123");
            writer.close();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }


    }
}
